/*
 * @Author: sansuixiaoxianxian 1634119605@qq.com
 * @Date: 2025-07-02 16:06:06
 * @LastEditors: sansuixiaoxianxian 1634119605@qq.com
 * @LastEditTime: 2025-07-10 11:23:33
 * @FilePath: /travel-record-library/src/main.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/*
 * @Author: 三岁小仙仙 scitctocdtu@qq.com
 * @Date: 2024-10-01 20:33:28
 * @LastEditors: 三岁小仙仙 scitctocdtu@qq.com
 * @LastEditTime: 2024-10-05 20:47:01
 * @FilePath: \demo\src\main.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createApp } from "vue"
import App from "@/App.vue"
import router from "@/router"
import pinia from "@store/pinia"
import Page from "@components/layout/Page.vue"
import * as indexedDB from "@utility/indexedDB"
import { DB } from "@/assets/global"
import "vant/es/notify/style"
import "vant/es/toast/style"
import "vant/es/dialog/style"
import { initBackButtonHandler } from "@/utility/backButton"
import '@fortawesome/fontawesome-free/css/all.min.css'
	; (async () => {
		const result = await indexedDB.init(DB.dbName, DB.store, DB.version)
		if (result) {
			console.log(`当前数据库版本：${result.version}`)
		}
	})()

if (window.plus) {
	initBackButtonHandler()
}

const app = createApp(App)

app.use(router)
app.use(pinia)

app.component("Page", Page)

app.mount("#app")
